package com.example.idachuappone.person.entity;

import java.io.Serializable;
import org.json.JSONObject;

public class OrderPriceItem implements Serializable {
    private String item_id;
    private String item_name;
    private String price;

    public OrderPriceItem parseJson(JSONObject json) {
        if (json == null) {
            return null;
        }
        if (json.has("item_id")) {
            this.item_id = json.optString("item_id");
        }
        if (json.has("item_name")) {
            this.item_name = json.optString("item_name");
        }
        if (!json.has("price")) {
            return this;
        }
        this.price = json.optString("price");
        return this;
    }

    public String getItem_id() {
        return this.item_id;
    }

    public void setItem_id(String item_id) {
        this.item_id = item_id;
    }

    public String getItem_name() {
        return this.item_name;
    }

    public void setItem_name(String item_name) {
        this.item_name = item_name;
    }

    public String getPrice() {
        return this.price;
    }

    public void setPrice(String price) {
        this.price = price;
    }
}
